class Notifier < ActionMailer::Base
  def pending_review_message(recipient, url_name, page)
    @from = 'website@vailsys.com'
    @recipients = recipient
    @subject = 'A page is pending your review'
    @body["url_name"]= url_name
    @body["page"]= page
    @sent_on = Time.now
  end

  def edit_message(page, url_name)
    @from ='website@vailsys.com'
    @recipients = page.user.email
    @subject ='A page has been assigned to you'
    @body["page"]= page
    @body["url_name"]= url_name
    @sent_on = Time.now
  end
  
  def reject_message(page, url_name)
    @from = 'website@vailsys.com'
    @recipients = page.user.email
    @subject = 'Your page needs to be re-edited'
    @body['page'] = page
    @body["url_name"]= url_name
    @sent_on = Time.now
  end
  
  def comment_message(page, comment, url_name)
    @from = 'website@vailsys.com'
    @recipients = page.user.email
    @subject = 'A comment has been made on your page'
    @body['page']= page
    @body['comment']= comment
    @body["url_name"]= url_name
    @sent_on = Time.now
  end
end
